﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
//using System.Linq;
using System.Text;
using System.Windows.Forms;

using IEQ_Superintendencia.User_Interface;

namespace IEQ_Superintendencia
{
    public partial class Principal : Form
    {

        #region Declaração de Variaveis
        private User_Interface.UICadIgreja objCadastroIgreja;
        private User_Interface.UICadPastor objCadastroPastor;
        private User_Interface.UICadCulto objCadastroCulto;
        
        #endregion


        public Principal()
        {
            InitializeComponent();
        }


        #region Carrega Cadastro IGREJA
        public void CarregaCadastroIgreja()
        {
            pnlPrincipal.Width = this.Width;
            //pnlPrincipal.Height = this.Height;
            pnlPrincipal.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            objCadastroIgreja = new UICadIgreja();
            objCadastroIgreja.Width = this.Width;
            objCadastroIgreja.Height = this.Height;
            objCadastroIgreja.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;            
            
            pnlPrincipal.Controls.Clear();
            pnlPrincipal.Controls.Add(objCadastroIgreja);
        }
        #endregion

        #region Carrega Cadastro PASTOR
        public void CarregaCadastroPastor()
        {
            //pnlPrincipal.Width = this.Width;
            //pnlPrincipal.Height = this.Height;
            //pnlPrincipal.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            objCadastroPastor = new UICadPastor();

            //objCadastroPastor.Width = this.Width;
            //objCadastroPastor.Height = this.Height;
            //objCadastroPastor.Anchor = AnchorStyles.Bottom;
            //objCadastroPastor.Anchor = AnchorStyles.Top;
            //objCadastroPastor.Anchor = AnchorStyles.Left;
            //objCadastroPastor.Anchor = AnchorStyles.Right;
             
            pnlPrincipal.Controls.Clear();
            pnlPrincipal.Controls.Add(objCadastroPastor);
            

        }
        #endregion

        #region Carrega Cadastro CULTO
        public void CarregaCadastroCulto()
        {
            objCadastroCulto = new UICadCulto();
            pnlPrincipal.Controls.Clear();
            pnlPrincipal.Controls.Add(objCadastroCulto);
            
        }
        #endregion

        private void meCadastroIgreja_Click(object sender, EventArgs e)
        {
            CarregaCadastroIgreja();
        }

        private void bCadastroIgreja_Click(object sender, EventArgs e)
        {
            CarregaCadastroIgreja();
        }

        private void miSair_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void bCadastroPastor_Click(object sender, EventArgs e)
        {
            CarregaCadastroPastor();
        }

        private void miCadastroAvaliacao_Click(object sender, EventArgs e)
        {
            CarregaCadastroPastor();
        }

        private void bCadastroCulto_Click(object sender, EventArgs e)
        {
            CarregaCadastroCulto();
        }

        private void igrejaPastoreadaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            User_Interface.UICadIgrejaPast objIgPast = new UICadIgrejaPast();
            //pnlPrincipal.Controls.Clear();
            pnlPrincipal.Controls.Add(objIgPast);
        }

        





    }
}
